package dormouse.vfs.event;

import org.apache.commons.vfs2.FileObject;

/**
 * This event is triggered whenever the browser changes locations.
 */
public class LocationChangeEvent implements ILocationChangeEvent {

	private FileObject oldLocation = null;
	private FileObject newLocation = null;

	/**
	 * Constructor.
	 */
	public LocationChangeEvent() {

	}

	/**
	 * Constructor.
	 * 
	 * @param old
	 *            the old location.
	 * @param nu
	 *            the new location.
	 */
	public LocationChangeEvent(FileObject old, FileObject nu) {
		oldLocation = old;
		newLocation = nu;
	}

	@Override
	public FileObject getPreviousLocation() {
		return oldLocation;
	}

	@Override
	public FileObject getCurrentLocation() {
		return newLocation;
	}

}
